<template>
  <div>

    <el-container>

      <el-header class="layout-header">
        <h1 style="color: aliceblue;float: right;margin-right: 10px;font-size: 17px">Admin</h1>
        <el-avatar icon="el-icon-user-solid" style="margin-top: 10px;float: right;margin-right: 10px"></el-avatar>

        <img src="@/assets/tedu_logo.png" style="width: 120px;height: 40px;position: absolute;top: 10px">
        <h1 style="color: aliceblue;margin-left: 10%; ">抽奖后台管理系统</h1>
      </el-header>

      <el-container class="layout-body">
        <el-aside class="layout-aside" style="width: 200px">
          <el-menu
              background-color="#545c64"
              router
              :default-active="this.$router.currentRoute.path"
              text-color="#fff"
              active-text-color="#ffd04b"
              class="el-menu-vertical-demo">
            <el-menu-item index="/home/index">
              <i class="el-icon-s-home"></i>首页
            </el-menu-item>
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-s-tools"></i>
                <span>用户管理</span>
              </template>
              <el-menu-item index="/user-list">
                <i class="el-icon-document"></i>操作日志
              </el-menu-item>
            </el-submenu>
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-s-grid"></i>
                <span>活动管理</span>
              </template>
              <el-menu-item index="/home/activity-list">
                <i class="el-icon-postcard"></i>活动列表
              </el-menu-item>
              <el-menu-item index="/home/activity-rule-list">
                <i class="el-icon-postcard"></i>活动规则
              </el-menu-item>
            </el-submenu>
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-trophy"></i>
                <span>奖品管理</span>
              </template>
              <el-menu-item index="/home/prize-list">
                <i class="el-icon-present"></i>奖品列表
              </el-menu-item>
            </el-submenu>

          </el-menu>
        </el-aside>
        <el-main style="background-color: rgba(245, 246, 249, 1);">
          <router-view/>
        </el-main>
      </el-container>
    </el-container>

  </div>
</template>

<script>

// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'HomeView',
  components: {},
}
</script>
<style>
.layout-header {
  background-color: #545c64;
  line-height: 60px;

}

.layout-body {
  position: absolute;
  top: 60px;
  bottom: 0;
  right: 0;
  left: 0;
}

.layout-aside {
  background-color: #545c64;
}

.el-menu-item.is-active {
  background: #3d3c3c !important;
}
</style>